package vns.server.domain;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

import vns.shared.ObjectTypeFloatDTO;

public class ObjectTypeFloat {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key id;
	
	@Persistent
	private float value;
	
	public ObjectTypeFloat(ObjectTypeFloatDTO objectTypeFloatDTO){
		this.value=objectTypeFloatDTO.getValue();
	}
	
	public void updatefromDTO(ObjectTypeFloatDTO objectTypeFloatDTO){
		this.value=objectTypeFloatDTO.getValue();
	}
	
	public ObjectTypeFloatDTO toDTO(){
		ObjectTypeFloatDTO otFloat=new ObjectTypeFloatDTO(this.id,this.value);
		return otFloat;
	}
	
	public Key getId(){
		return id;
	}
	
	public float getValue(){
		return value;
	}
	
	public void setValue(float Value){
		this.value=Value;
	}
}
